import { BaseTableState } from '#/core'
import {
  InsertAccountReq,
  CommonUserInfo,
} from '@/api/userCenter/authority/model/accountModel'
import { RoleItem } from '@/api/userCenter/authority/model/roleModel'

export type TableStateWrapper = BaseTableState<CommonUserInfo>

export interface AccountDialogFormState
  extends Omit<InsertAccountReq, 'clientId'> {
  id?: string
  enabled?: boolean
  currentRole: string[]
}

export interface DialogState {
  visible: boolean
  type: 'add' | 'edit'
  title: string
  formState: AccountDialogFormState
  roleList: RoleItem[]
}
